package com.alon.spring01.controller;

import com.alon.spring01.utils.RSAUtil;

/**
 * @program: spring01
 * @description: 加密
 * @author: yulongguang
 * @create: 2019-08-12 14:23
 **/
public class RasutController {

    private static final String PUBLIC_KEY="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCSrfdQ112PvTGX9pQYFRnKTshnvSu3g1TEuldvAuw5Xt2+so5pq+zjT403G90YAspRKBF9feCrYjzdSOAoffIwEihrwjlqL11p5SUxgmt5oI77t0hy/DgdjDgTq3CG2Rbwyz3REFXrY4LKlVmu+EL1NLShCwF7EYwRNMu1LsBYLQIDAQAB";

    public static void main(String[] args) {

        try {
            String encrypt = RSAUtil.encrypt("张三", PUBLIC_KEY);
            System.out.println(encrypt);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
